import request from "@/utils/request";

let prefix = ''

export function dataSubjectPage(data) {
  return request({
    url: prefix + "/serviceShare/theme/page",
    method: "get",
    params: data
  });
}

export function dataSubjectPublish(data) {
  return request({
    url: prefix + "/serviceShare/theme/publish",
    method: "put",
    data
  });
}
export function dataSubjectOffline(data) {
  return request({
    url: prefix + "/serviceShare/theme/operationApp",
    method: "get",
    params: data
  });
}

export function dataSubjectEdit(data) {
  return request({
    url: prefix + "/serviceShare/theme/edit",
    method: "put",
    data
  });
}

export function dataSubjectAdd(data) {
  return request({
    url: prefix + "/serviceShare/theme/add",
    method: "post",
    data
  });
}

export function dataSubjectDesign(data) {
  return request({
    url: prefix + "/serviceShare/theme/design",
    method: "post",
    data
  });
}

export function dataSubjectGetAccessAddressPrefix(data) {
  return request({
    url: prefix + "/serviceShare/theme/getAccessAddressPrefix",
    method: "post",
    data
  });
}


export function dataSubjectDelete(data) {
  return request({
    url: prefix + "/serviceShare/theme/delete",
    method: "delete",
    data
  });
}

export function dataSubjectDetail(data) {
  return request({
    url: prefix + "/serviceShare/theme/detail",
    method: "get",
    params: data
  });
}



export function subjectNodeSaveQuery(data) {
  return request({
    url: prefix + "/themeNode/saveQueryData",
    method: "post",
    data
  });
}

export function subjectNodeEdit(data) {
  return request({
    url: prefix + "/themeNode/edit",
    method: "post",
    data
  });
}
export function subjectNodeAdd(data) {
  return request({
    url: prefix + "/themeNode/add",
    method: "post",
    data
  });
}
export function subjectNodeTreeById(id) {
  return request({
    url: prefix + "/themeNode/tree/" + id,
    method: "get",
  });
}

export function subjectQueryDaMengData(data) {
  return request({
    url: prefix + "/themeNode/queryDaMengData",
    method: "post",
    data: data
  });
}
export function subjectQueryRedisData(data) {
  return request({
    url: prefix + "/themeNode/queryRedisData",
    method: "post",
    data: data
  });
}
export function subjectNodePreviewById(id) {
  return request({
    url: prefix + "/themeNode/preview/" + id,
    method: "get",
  });
}
export function subjectNodeDeleteById(id) {
  return request({
    url: prefix + "/themeNode/delete/" + id,
    method: "delete",
  });
}


export function commonServiceDoService(data) {
  return request({
    url: prefix + `/commonService/doService`,
    method: "post",
    data: data
  });
}

export function commonServiceDoRedis(data) {
  return request({
    url: prefix + `/commonService/doRedisService`,
    method: "post",
    data: data
  });
}
export function commonServiceDoKafka(data) {
  return request({
    url: prefix + `/commonService/doKafkaService`,
    method: "post",
    data: data
  });
}
export function commonServiceDoData(data) {
  return request({
    url: prefix + `/commonService/doDataService`,
    method: "post",
    data: data
  });
}